#define _CRT_SECURE_NO_WARNINGS 1
#include<stdio.h>
#include<string.h>

int main()
{
	int i,j,n;
	char a[50];
	char b[50];

	printf("Please enter a:\n");
	gets(a);

	n = strlen(a);
	for (i = n - 1, j = 0; i >= 0; i--, j++)
	{
		b[j] = a[i];
	}
	b[j] = '\0';

	printf("b[50] is :");
	puts(b);

	return 0;
}